package com.yang;

import com.yang.yangCommand.VipController;
import org.bukkit.Bukkit;
import org.bukkit.event.Listener;
import org.bukkit.plugin.java.JavaPlugin;

public final class YangVip extends JavaPlugin implements Listener {

    @Override
    public void onEnable() {
        this.saveDefaultConfig();
        // 指令注册
        Bukkit.getPluginCommand("yangVipGive").setExecutor(new VipController(this));
        Bukkit.getPluginCommand("yangVipSave").setExecutor(new VipController(this));
        Bukkit.getPluginCommand("yangVipRemove").setExecutor(new VipController(this));
        // 监听注册
        getServer().getPluginManager().registerEvents(this, this);
        // 注册VIP监听事件
        VipController vip = new VipController(this);
        getServer().getPluginManager().registerEvents(vip, this);
    }

    @Override
    public void onDisable() {
    }
}
